/**
 * ...
 * @author Krzysztof Rozalski
 */

package test;
import hapi.math.Vector2D;
import hapi.physics.Speed;
import hapi.physics.Velocity;
import hapi.unit.HapiTestCase;

using hapi.physics.PhysicsFactoryMethods;

class TestVelocity extends HapiTestCase {

	public function testConstructor() {
		var velocity = new Velocity(0.0, new Vector2D(0.0, 0.0));
		assertTrue(velocity.speed.equals(Speed.zero));
	}
	
	public function testMult() {
		var velocity = new Velocity(6.0, new Vector2D(1.0, 0.0));
		velocity.multiplyBy(5);
		assertTrue(velocity.speed.equals(30.metersPerSecond()));
	}
}